class Solution:
    def letterCombinations(self, digits: str) -> List[str]:
        mapper={
            '2':['a','b','c'],
            '3':['d','e','f'],
            '4':['g','h','i'],
            '5':['j','k','l'],
            '6':['m','n','o'],
            '7':['p','q','r','s'],
            '8':['t','u','v'],
            '9':['w','x','y','z']
        }
        if not digits:
            return []
        result=[]
        offset=0
        def find(offset,prefix):
            nonlocal digits
            if offset==len(digits):
                result.append(prefix)
                return 
            for i in mapper[digits[offset]]:
                prefix+=i
                find(offset+1,prefix)
                prefix=prefix[:-1]
        find(0,"")
        return result

'''
执行用时：
32 ms
, 在所有 Python3 提交中击败了
94.18%
的用户
内存消耗：
14.9 MB
, 在所有 Python3 提交中击败了
5.67%
的用户
'''